import { defineStore } from 'pinia'

const useUserStore = defineStore('userStore', {
    persist: [
        { paths: ["refreshToken", "userInfo", "menu"], storage: localStorage },
        { paths: ["accessToken"], storage: sessionStorage }
    ],
    state: () => ({
        accessToken: "",
        refreshToken: "",
        userInfo: {
            avatar: ""
        },
        menu: new Array<Menu>()
    })
})

export default useUserStore;